package cn.stylefeng.guns.modular.business.frequency.banner.config;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author Administrator
 */
@SpringBootApplication
//@EnableEurekaClient
//@EnableDiscoveryClient
@EnableScheduling
//@MapperScan("com.tuotuo.system.mapper")
public class Application {

/*
    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(Application.class, args);
        SpringUtil.setApplicationContext(applicationContext);
    }

    @Bean
    public SpringContextHolder springContextHolder() {
        return new SpringContextHolder();
    }*/

    @Bean(name = "crawlExecutorPool")
    public ExecutorService crawlExecutorPool() {
        // 获取Java虚拟机的可用的处理器数，最佳线程个数，处理器数*2。根据实际情况调整
        int curSystemThreads = Runtime.getRuntime().availableProcessors() * 2;
        System.out.println("------------系统可用线程池个数：" + curSystemThreads);
        return Executors.newFixedThreadPool(curSystemThreads);
    }

    /**
     * 机器编号 当前单一机器 写死喽~
     */
    public static int MACHINE_ID = 1;

    public static final String USER_DEFAULT_PASSWORD = "123456";

    public static final String COMPANY_NAME = "安徽安达承运物流有限公司";
    public static final String ACTIVEMQ_PREFIX = "ad";

    /**
     * 短信
     */
    public static String ACCESSKEYID = "LTAI4FqrRxAm6iB5xeo7q69p";
    public static String ACCESSKEYSECRET = "h6Mhx74DwFzgm3tbe49IUtPJbXxAfx";

    //系统初始化角色菜单信息
//    public static List<PkgMenu> menuList;
//
//    public static Map<String, Role> roleMap = new HashMap<>();

    //阿里云OSS
    //public static String ALIYUN_OSS_REGION_ID = "cn-beijing";
    //public static String ALIYUN_OSS_REGION = "http://oss-cn-beijing.aliyuncs.com";
    //public static String ALIYUN_OSS_ACCESS_KEY_ID = "LTAI4FjLHsRDoR58Bs5BBhaf";
    //public static String ALIYUN_OSS_ACCESS_KEY_SECRET = "m4zYXSEgLNhZYOgIcVUAGg9ILwb0Py";
    //public static String ALIYUN_OSS_ASC_ARM = "acs:ram::1576861220862800:role/fe-test";

    // 收钱吧
    public static String SHOU_QIAN_BA_DOMAIN_URL = "https://vsi-api.shouqianba.com";
    public static final String SHOU_QIAN_BA_TERMINAL_SN = "100028890012152933";
    public static final String SHOU_QIAN_BA_TERMINAL_KEY = "ce904ab895d0d3f915376f4db4d75625";
    //开发者序列号
    public static String SHOU_QIAN_BA_VENDOR_SN = "91801080";
    //开发者秘钥
    public static String SHOU_QIAN_BA_VENDOR_KEY = "aec0f0923e5c508526247a28489b965d";
    //激活码
//    public static String SHOU_QIAN_BA_CODE = "66340642";
    public static String SHOU_QIAN_BA_CODE = "96044282";
    //app-id
    public static String SHOU_QIAN_BA_APP_ID = "2020062900002889";
    public static String SQB_RETURN_URL = "https://www.shouqianba.com";
    public static String SQB_PAY_PRO_GETWAY = "https://qr.shouqianba.com/gateway?";

    /**
     * 创建订单给发货人发送短信模板
     */
    public static final String SMS_NEW_ORDER_SENDER_CODE = "SMS_181545363";
    // 验证码登录
    public static final String SMS_CAPTCHA_FOR_USER_LOGIN = "SMS_215351366";
    // 修改手机号验证码
    public static final String SMS_CAPTCHA_PHONE_CHANGE = "SMS_215795833";

    /**
     * 收钱吧支付回调地址
     */
    public static final String SQB_NOTIFY_URL = "http://sysapi.chetuotuo.net/api/delivery/sqb-notify";

    public static final String MPCC_FILE_RECORD_URL = "https://cc.yunzongji.cn/mpccApi/externalApi/v300/fileDownLoad.json?fileName=";

    public static final String TX_MAP_KEY = "2PNBZ-BJI3R-A2HWY-W4E4I-KGWD5-L6BTK";
    public static final String TX_MAP_SECRET = "ZPptCm27mNcJMyC4rLLBNY6sUaODdWg";

    public static final String DING_PATH = "https://oapi.dingtalk.com/robot/send?access_token=363ce4201ca5021156370874c9cd20fd2d9574f2db2a4bb48bb96231c8751dba";

    public static final Long ORDER_PICK_OVER_TIME = 30 * 60 * 1000L;
    public static final Long ORDER_VERIFY_OVER_TIME = 3 * 60 * 60 * 1000L;

    /**待发运超时时间*/
    public static final Long ORDER_TRANSPORT_OVER_TIME = 24 * 60 * 60 * 1000L;
    public static final Long ORDER_DELIVERY_OVER_TIME = 24 * 60 * 60 * 1000L;

    // 订单默认超时确认到达时间
    public static final Long ORDER_AUTO_ARRIVE_TIME = 7 * 24 * 60 * 60 * 1000L;


}

